package com.chainyoung.component_tmperson.ui.view;

import android.content.Context;
import android.view.Gravity;
import android.view.View;
import android.widget.TextView;

import com.chainyoung.common.view.BaseDialog;
import com.chainyoung.component_tmperson.R;

public class RepaymentTimeRuleDialog {


    private Context mContext;
    private BaseDialog mDialog;

    private View.OnClickListener onClickListener;


    public RepaymentTimeRuleDialog(Context context, View.OnClickListener onClickListener) {
        mContext = context;
        this.onClickListener = onClickListener;
        init();

    }


    private void init() {
        BaseDialog.Builder mBuilder = new BaseDialog.Builder(mContext);
        mDialog = mBuilder.setViewId(R.layout.layout_repayment_time_rule)
                //.setAnimation(com.jingdu.gamewallet.commonlibs.R.style.Scale_aniamtion)
                .setGravity(Gravity.CENTER)
                .isOnTouchCanceled(true)
                .isCanceled(true)
                .setHeightdp(230)
                .setWidthdp(300)
                .builder();
        TextView tvConfirm = mDialog.getView(R.id.tv_confirm);
        tvConfirm.setOnClickListener(onClickListener);
    }

    public void show() {

        mDialog.show();

    }

    public void close() {
        mDialog.close();
    }

    public void setOnClickListener(View.OnClickListener onClickListener) {
        this.onClickListener = onClickListener;
    }


}
